package cate.game.role.mall.refresh;

import cate.game.role.Role;
import cate.game.role.RoleDependent;
import cate.game.role.mall.refresh.impl.IPayRefresh;
import cate.game.role.mall.refresh.item.PayRefreshItem;
import cate.game.role.mall.refresh.item.RefreshItem;
import com.fasterxml.jackson.annotation.JsonProperty;

public abstract class PayRefresh extends RoleDependent implements IPayRefresh {
    public PayRefreshItem pay;

    public void initialized(Role role) {
        super.initialize(role);
        if (pay == null) {
            pay = new PayRefreshItem();
        }
    }

    @Override
    public RefreshItem getPayRefreshItem() {
        return pay;
    }

    @JsonProperty("payTimes")
    public int getPayTimes() {
        return pay.times;
    }

    @JsonProperty("lastPayRefreshTime")
    public long getLastPayRefreshTime() {
        return pay.lastRefreshTime;
    }
}
